/**
 * 获取字典key
 */
export const getKeyByValue = (dictList, value) => {
    for (const dictData of dictList) {
        if (dictData.value === value) {
            return dictData.key;
        }
    }
    return value;
};

/**
 * 获取字典样式css
 */
export const getCssByValue = (dictList, value) => {
    for (const dictData of dictList) {
        if (dictData.value === value) {
            return dictData.css;
        }
    }
    // 默认样式：'success'
    return 'success';
};